package com.wecheir.dao;

import com.wecheir.entity.Farm;
import com.wecheir.entity.FarmData;
import com.wecheir.entity.Message;
import com.wecheir.entity.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.awt.*;
import java.util.Date;
import java.util.List;
import java.util.Set;

@Repository
public interface FarmDao extends BaseDao<Farm>{
    Farm selectFarmById(@Param("id") int id);


    void saveFarmMenus(@Param("roleId") Farm roleId, @Param("uuid")String uuid);


//    List<Farm> getFarmByUserId(@Param("userId") String userId);


    List<Farm> getFarmByUser(@Param("id") String id,@Param("start")int start,@Param("limit") int limit);

    List<FarmData> getFarmData(@Param("farm_id") String farm_id, @Param("beginDate") Date beginDate, @Param("endDate")  Date endDate);

    List<Farm> getFarmByUserId(@Param("userId") String userId);
//    void addFarm(@Param("farm") Farm farm);


    void updateFarm(@Param("id") int id);

    int updateFarmImg(@Param("id") int id, @Param("imgUrl") String imgUrl);

    int getFarmNameCount(@Param("name") String name);
}
